package com.stroke.util;

import java.io.File;

/**
 * Author: Igor Bubelov
 * Date: 3/13/11 2:34 PM
 */
public class FileHelper {
    public static String name(File file) {
        int dotIndex = file.getName().lastIndexOf(".");
        return file.getName().substring(0, dotIndex - 1);
    }

    public static String extension(File file) {
        int dotIndex = file.getName().lastIndexOf(".");
        return file.getName().substring(dotIndex + 1);
    }
}
